package com.agger.harmonyosthemeseditor.intelligent;

import java.util.List;

public class VariableTool
{
    public static float getAverage(float[] all)
    {
        float sum = 0f;
        for (float v : all)
            sum += v;
        return (sum/all.length);
    }

    public static float getAverage(List<Float> all)
    {
        float sum = 0f;
        for (Float v : all)
            sum += v;
        return (sum/all.size());
    }

    public static int getAverage(int[] all)
    {
        int sum = 0;
        for (int v : all)
            sum += v;
        return (sum/all.length);
    }
}
